<?php
	$base=$_REQUEST['image'];
	 $binary=base64_decode($base);
	header('Content-Type: bitmap; charset=utf-8');
	$un = $_POST['un'];
	$file = fopen("profilepictures/".$un.".jpg", 'wb');
	fwrite($file, $binary);
	fclose($file);
	echo 'Image upload complete!!';
?>
